package com.wangyk.rabbitmqconsole.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * 消息接收者
 * @Author: wangyk
 * @CreateDate: 2018/11/20$ 17:58$
 * @UpdateUser: wangyk
 * @UpdateDate: 2018/11/20$ 17:58$
 * @UpdateRemark:
 * @Version: 1.0
 */
@Component
//监听队列
@RabbitListener(queues = "wangykTest1")
public class Receiver
{
    @RabbitHandler
    public void receiver(String msg)
    {
        System.out.println("Test1 receiver1:" + msg);
    }
}
